package 日期类使用同步.unsync;

import 日期类使用同步.sync.DateUtil;

import java.util.Date;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

/**
 * @Description:
 * @Author: ywk
 * @Date: 2019/12/21 0021 10:13
 */
public class TestE {
    public static void main(String[] args) throws InterruptedException {
//        Calendar calendar = Calendar.getInstance(TimeZone.getTimeZone("GMT+0"));
//        Calendar calendar1 = Calendar.getInstance(TimeZone.getTimeZone("GMT+8"));
//        System.out.println(calendar.getTime());
//        System.out.println(calendar1.getTime());

        ExecutorService executorService = Executors.newFixedThreadPool(500);
        long l = System.currentTimeMillis();
        for (int i = 0; i < 50; i++) {
            executorService.execute(() -> {
                for (int i1 = 0; i1 < 20; i1++) {
                    Date parse = null;
                    try {
//                            parse = DataFormatUtils.yyyy_MM_dd_HH_mm_ss.parse("2014-01-01 00:00:00");
                        DateUtil.parse("2000-09-13", DateUtil.patten1);
                    } catch (Exception e) {
                        e.printStackTrace();
                        System.out.println(e);
                        System.out.println(parse);
                    }
                }
            });
        }

        System.out.println("end" + (System.currentTimeMillis() - l));
//            Thread.sleep(3000000);
    }

}
